package com.guet.controller.teacher;

import com.guet.DTO.RegisterDTO;
import com.guet.result.Result;
import com.guet.service.RegisterService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController("TeaRegisterController")
@RequestMapping("teacher/register")
@Slf4j
@CrossOrigin
public class RegisterController {
    @Autowired
    private RegisterService registerService;

    @PostMapping
    public Result<Object> register(@RequestBody RegisterDTO registerDTO) {
        registerService.register(registerDTO);
        return Result.success();
    }
}
